#ifndef __CBACKGROUND_H__
#define __CBACKGROUND_H__

//khai bao thu vien QuadTree va Object
#include "Object.h"

//Duong dan anh nen
#define DATLIEN "Images\\Background.jpg"
#define BIENDAO "Images\\Background.jpg"

struct BackgroundSpriteInfo
{
	int index;
	int width;
	int height;
	int deltaXSprite;
	int deltaYSprite;
	int spriteCount;
	int timeDelay;
	int lastTime;
	int mapImage;//1.sightDay 2.sightNight
};

class CBackGround :public Object
{
private:
	static LPDIRECT3DTEXTURE9 _datLien;
	static LPDIRECT3DTEXTURE9 _bienDao;
	BackgroundSpriteInfo infoDaw;
public:
	static void InitResoure();//Static load anh nen

	CBackGround(void);
	CBackGround(int left,int top,int kind);
	~CBackGround(void);
	void Update(int leftRect,int Style);
	int Move();
	void Collision(Object *Ob);
	void Release(){}

};
#endif